<?php

/**
 * Created by PhpStorm.
 * User: PX780
 * Date: 2016/10/30
 * Time: 21:02
 */
class mystring{
    public static $lineCount=1;
     public static function split($str,$len=16){
         $title = "";
         $totalLen = mb_strlen(($str));
         for($i = 0; $i < $totalLen; $i++){
             $title .= mb_substr($str,$i,1);
             if(fmod($i,$len)==0 && $i >=$len){
                 $title .= "\r\n";
                 self::$lineCount++;
             }
         }
         return $title;
    }

    public static function getLineCount(){
        return self::$lineCount;
    }
}
